package com.itheima.demo;

import com.itheima.domain.User;
import com.itheima.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Test01 {
    //测试spring整合mybatis
    public static void main(String[] args) {
        ApplicationContext ac= new ClassPathXmlApplicationContext("spring.xml");
       UserService userService = (UserService)ac.getBean("userService");
        List<User> all = userService.findAll();
        System.out.println(all);
    }
}
